const presets = [
    ["@babel/preset-env",
        { //配置兼容的浏览器版本
            targets: {
                edge: "17",
                firefox: "60",
                chrome: "67",
                safari: "11.1"
            },
            //配合@bable/polyfill(可以模拟完整的ES6+环境)
            //假如参数值为"usage"，babel将检查你的所有代码，查找目标环境中缺失的功能，然后只把必须的polyfill包含进来
            //假如参数不是"usage"，将会把完整的polyfill包含进来
            useBuiltIns: "usage"
        }
    ]
];
module.exports = {
    presets,
    //presets: ['@babel/preset-env'], //不配置targets，将转换所有ES6+代码为ES5兼容，一般不这样做
    plugins: ['@babel/plugin-transform-runtime', '@babel/plugin-proposal-class-properties']
}